package com.itheima.service;


import com.itheima.config.HystrixConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Service
@FeignClient(value = "hystrix-provider",configuration = HystrixConfig.class,fallback = LocalItemServiceImpl.class)
public interface LocalItemService {


    @RequestMapping(value="/hello",method = RequestMethod.GET)
    public String hello(@RequestParam(value = "name") String name);

    @RequestMapping(value="/hi",method = RequestMethod.GET)
    public String hi(@RequestParam(value = "age") String age);
}
